"use strict";
var app = angular.module("myapp", []);
app.controller("SearchController", function($scope) {
	var data = eval("("+result+")");
	console.log(data);
	if (data.error != 0) {
		$scope.results = [];
	}else {		
		$scope.results = data.data;
	}
	$scope.mousein = function(row) {
		$scope.selectedRow = row;
	};
	$scope.download = function(row) {
		location.href = "download?fileID=" + $scope.results[row].fileID;
	};
		
});